import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/curve',
    },
    {
      path: '/template',
      name: 'template',
      component: () => import('../views/TemplateView.vue')
    },
    {
      path: '/curve',
      name: 'curve',
      component: () => import('../views/CurveView.vue')
    },
    {
      path: '/curve/:settings?',
      name: 'curve',
      component: () => import('@/views/CurveView.vue')
    },
    {
      path: '/data',
      name: 'data',
      component: () => import('../views/DataView.vue')
    },
    {
      path: '/log',
      name: 'log',
      component: () => import('../views/LogView.vue')
    }
  ]
})

export default router